package jaoso.framework.domain;

import org.apache.commons.lang.builder.ToStringBuilder;

import com.yl.cap.analyst.user.domain.User;

import java.io.Serializable;

/**
 * @author Hibernate CodeGenerator
 */
public class Account implements Serializable
{
    /** nullable persistent field */
    private jaoso.framework.domain.Role group;

    /** identifier field */
    private String id;

    /** persistent field */
    private String name;

    /** persistent field */
    private String password;
    
    private User user;

    /**
     * full constructor
     */
    public Account(final String name, final String password, final Role group)
    {
        this.name = name;
        this.password = password;
        this.group = group;
    }

    /**
     * default constructor
     */
    public Account()
    {
    }

    /**
     * minimal constructor
     */
    public Account(String name, String password)
    {
        this.name = name;
        this.password = password;
    }

    /**
     * DOCUMENT ME!
     * 
     * @param group
     *            DOCUMENT ME!
     */
    public void setGroup(jaoso.framework.domain.Role group)
    {
        this.group = group;
    }

    /**
     * DOCUMENT ME!
     * 
     * @return DOCUMENT ME!
     */
    public jaoso.framework.domain.Role getGroup()
    {
        return this.group;
    }

    /**
     * DOCUMENT ME!
     * 
     * @param id
     *            DOCUMENT ME!
     */
    public void setId(String id)
    {
        this.id = id;
    }

    /**
     * DOCUMENT ME!
     * 
     * @return DOCUMENT ME!
     */
    public String getId()
    {
        return this.id;
    }

    /**
     * DOCUMENT ME!
     * 
     * @param name
     *            DOCUMENT ME!
     */
    public void setName(String name)
    {
        this.name = name;
    }

    /**
     * DOCUMENT ME!
     * 
     * @return DOCUMENT ME!
     */
    public String getName()
    {
        return this.name;
    }

    /**
     * DOCUMENT ME!
     * 
     * @param password
     *            DOCUMENT ME!
     */
    public void setPassword(String password)
    {
        this.password = password;
    }

    /**
     * DOCUMENT ME!
     * 
     * @return DOCUMENT ME!
     */
    public String getPassword()
    {
        return this.password;
    }

    /**
     * DOCUMENT ME!
     * 
     * @return DOCUMENT ME!
     */
    public String toString()
    {
        return new ToStringBuilder(this).append("id", getId()).toString();
    }
    /**
     * @return Returns the user.
     */
    public User getUser()
    {
        return user;
    }
    /**
     * @param user The user to set.
     */
    public void setUser(User user)
    {
        this.user = user;
    }
}